package com.party.core.dao.read.mall;

import com.party.common.paging.Page;
import com.party.core.dao.read.BaseReadDao;
import com.party.core.model.mall.MallShowCategoryWithGoods;
import com.party.core.model.mall.MallShowGoods;
import com.party.core.model.mall.MallShowGoodsWithAuthor;
import com.party.core.model.mall.MallShowGoodsWithCategory;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 展示商品数据读取
 * Created by wei.li
 *
 * @date 2017/8/24 0024
 * @time 15:47
 */

@Repository
public interface MallShowGoodsReadDao extends BaseReadDao<MallShowGoods> {

    /**
     * 商品列表
     * @param mallShowCategoryWithGoods 商品
     * @param page 分页参数
     * @return 列表数据
     */
    List<MallShowCategoryWithGoods> withCategoryListPage(MallShowCategoryWithGoods mallShowCategoryWithGoods, Page page);

    /**
     * 商品列表
     * @param mallShowGoodsWithAuthor 商品
     * @param page 分页参数
     * @return 列表数据
     */
    List<MallShowGoodsWithAuthor> withAuthorListPage(MallShowGoodsWithAuthor mallShowGoodsWithAuthor, Page page);

    List<MallShowGoodsWithCategory> platList(@Param("subjectId") String subjectId, @Param("templateId") String templateId, Page page);

    /**
     * 获取分销商品
     *
     * @param params 请求参数
     * @return
     */
    List<Map<String, Object>> getDistributorGoods(@Param(value = "params") Map<String, Object> params);
}
